APP_NAME=socket_client
PRJ_PATH=$(shell pwd)
LIBS_PATH=${PRJ_PATH}/3rdlib/install
#compile falgs
CFLAGS  = -I ${LIBS_PATH}/include
#ld(links) falgs
LDFLAGS  = -L ${LIBS_PATH}/lib
LDFLAGS +=  -lzlog -lsqlite3 -lcjson -lwiringPi -lpthread
all: libs
	gcc ${CFLAGS} *.c  -o ${APP_NAME} ${LDFLAGS}
libs:
	make -C 3rdlib
clean: distclean
	rm -f  ${APP_NAME}
	rm -f *.o
	rm -f *.i
	rm -rf *.db
	rm -f *.log
	make clean -C 3rdlib
distclean: 
	make distclean -C 3rdlib

